<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/common/taglibs.jsp"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<%@include file="/common/header.jsp"%>
<script type="text/javascript" src="${ctx}/js/erp/system/listUser.js"></script>
<script type="text/javascript">
function formatOperate(value,rowData){
    var userId = rowData.id;
    var optTemplate = "";
        optTemplate += "<a class=\"btn btn-mini ml5\" href=\"javascript:assignRoles("+userId+",'"+rowData.loginName+"');\"><i class=\"icon-lock\"></i>分配角色</a>";
        optTemplate += "<a class=\"btn btn-mini ml5\" href=\"javascript:editUser("+userId+");\"><i class=\"icon-edit-data\"></i>修改</a>";
        <erp:privilege resourceUri="/user/delUser.action">
           <erp:privilegeYes>
              optTemplate += "<a class=\"btn btn-mini ml5\" href=\"javascript:delUser("+userId+");\"><i class=\"icon-remove-data\"></i>删除</a>";
           </erp:privilegeYes>
        </erp:privilege>
        return optTemplate;
}
</script>
<title>list User</title>
</head>
<body class="easyui-layout">
     <div id="assign-roles-dialog">  
        <div class="p5">
            <table id="rolesGrid"></table>
        </div>
     </div>
     <div region="center" style="border: none;">
        <div id="searchPanelBox" class="m5">
	        <div id="searchPanel" class="p5">
	            <form id="queryUserForm" name="queryUserForm" action="" method="post" class="mb5">
	                <ul> 
                        <li class="pl10 fl"> 
	                        <label for="loginName" class="fl pt3 pr5">账号：</label> 
	                        <input name="loginName" class="span2" type="text" value=""/>
                        </li>
	                     <li class="pl10 fl"> 
	                        <label for="realName" class="fl pt3 pr5">名字：</label> 
	                        <input name="realName" class="span2"  type="text" value=""/>
	                    </li>
	                    <li class="pl10 fl"> 
	                       <label for="createStartTime" class="fl pt3 pr5">创建时间：</label> 
	                       <input name="createStartTime" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',readOnly:true})" class="Wdate w150" type="text" value=""/> 
	                    </li>
	                    <li class="pl10 fl"> 
	                       <label for="createEndTime" class="fl pt3 pr5">至</label> 
	                       <input name="createEndTime" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',readOnly:true})" class="Wdate w150" type="text" value=""/> 
	                    </li>
	                    <li class="pl10 fl"> 
	                        <a id="queryUserBtn" class="easyui-linkbutton" iconCls="icon-search">&nbsp;查&nbsp;&nbsp;询&nbsp;</a>
	                    </li>
	                </ul>
	                <div class="fn-clear"></div>
	            </form>
	        </div>
        </div>
        <div class="m5">
            <table id="dataGrid" data-options="toolbar:'#dg-toolbar'"></table>
        </div>
    </div>
    <div id="dg-toolbar">
        <div class="m5">
            <erp:privilege resourceUri="/user/toAddUser.action">
                <erp:privilegeYes>
                    <a id="add-user-btn" class="easyui-linkbutton" iconCls="icon-add" plain="false">添加</a>
                </erp:privilegeYes>
            </erp:privilege>
            <erp:privilege resourceUri="/user/delUser.action">
                <erp:privilegeYes>
                    <a id="delete-user-btn" class="easyui-linkbutton" iconCls="icon-remove" plain="false" >删除</a>
                </erp:privilegeYes>
            </erp:privilege>
        </div>
    </div>
</body>
</html>